package com.aos.eap.adapter;


import android.widget.TextView;

import com.aos.eap.R;
import com.aos.eap.bean.ChooseRepairBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import androidx.annotation.Nullable;


public class RepairChooseTypeListAdapter extends BaseQuickAdapter<ChooseRepairBean, BaseViewHolder> {

    public RepairChooseTypeListAdapter(@Nullable List<ChooseRepairBean> data) {
        super(R.layout.adapter_repair_choose_type_list, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, final ChooseRepairBean item) {

        helper.setText(R.id.tvType, item.getChooseType());
        TextView tvWrite = helper.getView(R.id.tvGo);
        if (item.isOk()) {
            tvWrite.setText("已做");
            tvWrite.setTextColor(mContext.getResources().getColor(R.color.free_ui_blue_sky_theme_color));
        } else {
            tvWrite.setText("未做");
            tvWrite.setTextColor(mContext.getResources().getColor(R.color.free_ui_blue_sky_text_gray));
        }
    }
}
